<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <style>
        .red {
            color: red;
        }
    </style>
</head>

<body>
    <div id="app" class="flex f12">asdfasdffsf</div>

    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script>
        // 添加class red 
        $('#app').addClass('red');

        // 移除class red
        setTimeout(function() {
            $('#app').removeClass('red');
        }, 2000)
    </script>
</body>

</html>